1. Field of the Invention
The present invention relates to a scripting system by which the functionality present in an application program may be executed via a script. More particularly, the invention pertains to a scripting system in which the application program designates the functionality that may be invoked by a script, and in which a script interpreter, which is instantiated as an object separate from the application program, contains a list of scripts that may be invoked and a list of corresponding events that cause the script to be invoked. The application program signals that events have occurred to the script interpreter which, in turn, interprets corresponding scripts.
2. Description of the Related Art
In an effort to permit users of application programs to customize the functionality of the programs, application programs have recently allowed users to write customized scripts. The scripts include a sequence of script commands such as commands to invoke functionality of the application program, and allow the user to specify how the application program operates. With scripts, a user can customize the application program to meet specific demands of the implementation. Examples of scripts include macros for word processing programs such as WordPerfect.RTM. or Word for Windows.RTM., and macros for spreadsheet programs such as Lotus.RTM. 1-2-3.
Such scripts, however, are tightly bound to their associated application programs. "Tightly bound" means that the script is designed only for one specific application program. Thus, both the script language that is used in the script as well as the functionality that may be invoked from the script are both defined in the context of one application program.
Because script are tightly bound to their application program, difficulties have arisen in the use of scripts. For example, the script language cannot be used in another application program which ordinarily will define its own scripting language. Further, it is not now possible for a script invoked from one application program to use functionality of another application program.